<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #content{
            height: 800px;
            background-color:brown  ;
        }
        #content2{
            height: 800px;
            background-color: blue;
        }
        #nav{
            width: 100px;
            height: 200px;
            background-color:coral ;
            position:fixed;
            top: 50px;
        }
    </style>
</head>
<body>
    <div id="content">
        <div id="nav">导航栏</div>
    </div>
    <div id="content2">内容</div>
</body>
</html>